{eval include template($common_template_pluginid.':new/common/header');}

<div class="weui-cells_form" >
	<iframe style="display:none" name="myiframe" id="myiframe"></iframe>
	<form id="postform" name="postform" action="plugin.php?id=aljbd&act={$_GET['act']}" method="POST"  accept-charset="utf-8">
		<input type="hidden" name="formhash" value="{FORMHASH}">
		<input type="hidden" name="nid" value="{$_GET['nid']}">
		<input type="hidden" name="bid" value="{$bid}">
		<input type="hidden" name="aljbd_notice_token" value="{eval echo create_token('aljbd_notice_token');}">
		<input type="hidden" name="type" id="type" value="{$json_typelist[0]['code']}">
		<input type="hidden" name="subtype" id="subtype" value="$json_typelist[0]['sub'][0]['code']">

		<div class="weui-cell">
			<div class="weui-cell__hd"><label class="weui-label">{lang aljbd:s283}</label></div>
			<div class="weui-cell__bd">
				{eval echo dhtmlspecialchars($bd['name']);}
			</div>
		</div>
		<div class="weui-cell">
			<div class="weui-cell__hd"><label class="weui-label">{lang aljbd:s284}</label></div>
			<div class="weui-cell__bd">
				<input class="weui-input" type="text" name="subject" value="$n['subject']" placeholder="{lang aljbd:addnotice_touch_1}" >
			</div>
		</div>

		<div class="weui-cell weui-cell_access">
			<div class="weui-cell__hd"><label class="weui-label">{lang aljbd:s223}</label></div>
			<div class="weui-cell__bd">
				<input class="weui-input" type="text" id='type-picker' value="{$default_type}"  placeholder="{lang aljbd:s224}"/>
			</div>
			<div class="weui-cell__ft"></div>
		</div>
		<div class="weui-cells weui-cells_form" style="margin-top: 0px;">
			<div class="weui-cell">
				<div class="weui-cell__bd">
					<textarea class="weui-textarea" name="intro" placeholder="{lang aljbd:addnotice_touch_2}" rows="3">{$n['content']}</textarea>
				</div>
			</div>
		</div>
		<div class="weui-btn-area">
			<button class="weui-btn weui-btn_primary" name="submit" type="submit" value="Y" onclick="$.showLoading();">{lang aljbd:sj_dianping_12}</button>
		</div>
	</form>
</div>
<script>
    +function($){
        $.rawtypeData = $typejson;
    }($);
</script>
<script src="{$common_path}/static/weui/js/type-picker.min.js" charset="utf-8"></script>
<script>
    $("#type-picker").cityPicker({
        title: "{lang aljbd:addnotice_touch_3}",
        showDistrict: false,
        onChange: function (picker, values, displayValues) {
            console.log(values);
            $('#type').val(values[0]);
            $('#subtype').val(values[1]);
            if(values[1] == values[2]){
                $('#subtype3').val('');
            }else{
                $('#subtype3').val(values[2]);
            }
        }
    });
</script>

{eval include template($common_template_pluginid.':new/common/footer');}